// index.js
const computedBehavior = require("miniprogram-computed").behavior;
Page({
  behaviors: [computedBehavior],
  data: {
    firstName: "科比",
    lastName: "布莱恩特",
    time: 30 * 60 * 60 * 1000,
    timeData: {},
  },
  computed: {
    fullName(data) {
      // computed中的函数中没有this,可以通过参数data获取数据
      // console.log(data);
      return data.firstName + "·" + data.lastName;
    },
  },

  onChange(e) {
    // console.log(e.detail);
    this.setData({
      timeData: e.detail,
    });
  },
});
